<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
	</head>
	<body>
		
	</body>
	
	<script>
		
		//编写一个函数，在页面上输出一个N行M列的表格，
		
		function printTable(rows, cols) {
			document.write("<table border=1>");
			for(var i=0; i<rows; i++){
				document.write("<tr>");
				for(var j=0; j<cols; j++){
					var r = parseInt(Math.random()*256).toString(16);
					var g = parseInt(Math.random()*256).toString(16);
					var b = parseInt(Math.random()*256).toString(16);
					
					document.write("<td style='background:#"+r+g+b+"'>"+ parseInt(Math.random()*1000) +"</td>");
				}
				document.write("</tr>");
			}
			document.write("</table>");
		}
		
		
		
	</script>
	
</html>